<?php 
include('../../include/functions.inc.php');
include('../../include/maintenance.inc.v2.php');
$dir=dirname(__FILE__);
$dir=$dir."/uploads/";
$_SESSION["UPLOAD_PATH"]=$dir;

if($_SESSION['mTeacher']==NULL){
	$mTeacher=new Maintenance();
	
	$mTeacher->windowTitle='Mantenimiento de Catedraticos';
	$mTeacher->newUrlPage='new.php';
	$mTeacher->editUrlPage='edit.php';
	$mTeacher->saveNewUrlPage='data.php';
	$mTeacher->updateUrlPage='data.php';
	$mTeacher->deleteUrlPage='data.php';
	$mTeacher->listJsonUrl='list.php';
	$mTeacher->path='../..';
	$mTeacher->table="cllg_teacher";
	$mTeacher->validations=array("required,ID,Identifiacion es Requerido",
						"required,FIRST_NAME,Nombres es Requerido",
						"required,LAST_NAME,Apellidos es Requerido");
	$mTeacher->loadDynValidations($db);	
	$mTeacher->addExtraJsFile("sft.cllg.teachers.js");
	$mTeacher->panels=TRUE;
	$_SESSION['mTeacher']=serialize($mTeacher);
}else{
    $mTeacher=&unserialize($_SESSION['mTeacher']);
}

if(!isEmpty(getParam('statics'))){
    $mTeacher->statics(count($db->query_select('cllg_teacher')));
}else{
   	$mTeacher->build();
}
?>